<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.jd.ty.pojo" >
	<class name="Function" table="FUNCTION" schema="TYMS">
	    <id name="functionId" type="java.lang.Long">
			<column name="FUNCTION_ID" precision="10" scale="0" />
			<generator class="native" />
		</id>
		<property name="functionName" type="java.lang.String">
			<column name="FUNCTION_NAME" length="50" not-null="true" />
		</property>
		<many-to-one name="parent" class="com.jd.ty.pojo.Function"
			column="PARENT_ID" cascade="save-update" lazy="false"/>
		<bag name="children" cascade="all" inverse="true" lazy="false">
			<key column="PARENT_ID" />
			<one-to-many class="com.jd.ty.pojo.Function" />
		</bag>
		<property name="rootUrl" type="java.lang.String">
			<column name="ROOT_URL" length="50" not-null="false" />
		</property>
		<property name="nameSpace" type="java.lang.String">
			<column name="NAME_SPACE" length="100" not-null="false" />
		</property>
		<property name="isDefault" type="java.lang.Boolean">
			 <column name="IS_DEFAULT" length="1" not-null="true"  default="0" />
		</property>
	</class>
</hibernate-mapping>
